import axios from 'axios'

export const TenderPurchaseDetailService = class TenderPurchaseDetailService {
    static tenderPurchaseDetailService = null
    requestUrl = 'http://localhost/tenderPurchaseDetails'

    static getInstance() {
        if (this.tenderPurchaseDetailService == null) {
            this.tenderPurchaseDetailService = new TenderPurchaseDetailService()
        }
        return this.tenderPurchaseDetailService
    }

    /**
     * 根据计划id查询明细
     * @param planId
     */
    getByPlan(planId) {
        return axios.get(`${this.requestUrl}/plan/${planId}`)
    }

    /**
     * 分页查询数据
     * @param params
     */
    getPageList(params) {
        return axios.get(`${this.requestUrl}/page`,{
            params
        })
    }
}
